package com.cuijq.ms.springfactory;


import com.cuijq.ms.springfactory.exception.NoSuchBeanDefinitionException;

/**
 * @Classname Demo
 * @Description TODO
 * @Date 2021/5/6 11:27
 * @Created by CuiJQ
 */
public class Demo {

  public static void main(String[] args) throws NoSuchBeanDefinitionException {
    ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
    RateLimiter rateLimiter = (RateLimiter) applicationContext.getBean("rateLimiter");
    rateLimiter.test();
    //...
  }
}
